/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.googlecode.midpdeviceprofiler;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;

/**
 *
 * @author helio.rodrigues
 */
public class MidpProfileView extends Form {
    
    private Command backCommand = new Command("Back", Command.BACK, 0);
    
    /**
     * 
     */
    public MidpProfileView() {
        super("MIDP Profile");
        
        StringItem item = new StringItem("CLDC:",
                ClassProber.probe("java.lang.Double") ? "1.1" : "1.0");
        
        append(item);
        
        item = new StringItem("MIDP:",
                ClassProber.probe("javax.microedition.lcdui.game.Layer") ? "2.0" : "1.0");
        
        append(item);
        addCommand(backCommand);
        setCommandListener(DeviceProfilerMidlet.getInstance());
    }

    /**
     * @return the backCommand
     */
    public Command getBackCommand() {
        return backCommand;
    }
}
